package com.yukong.wiremock;

import com.github.tomakehurst.wiremock.client.MappingBuilder;
import com.github.tomakehurst.wiremock.client.WireMock;
import org.mockito.Mock;
import org.springframework.test.web.servlet.MockMvcBuilder;

/**
 * Description:
 * User: xp
 * Date: 2018-01-05
 * Time: 14:19
 */
public class MockServer {

    public static void main(String[] args) {
        //指定端口
        WireMock.configureFor(8088);
        //移除之前所有配置
        WireMock.removeAllMappings();

        WireMock.stubFor(WireMock.get(WireMock.urlPathEqualTo("/order/1")).willReturn(WireMock
                .aResponse()
                .withBody("{\"id\":\"1\"}")
                .withStatus(200)
        ));
    }

}
